﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <link rel="stylesheet" href="../../../../lib/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../../../../css/site.css" />
</head>
<body>
    <form>
        <div class="form-group">
            <label for="FromDir">FromDir</label>
            <input type="text" class="form-control" id="FromDir" placeholder="FromDir">
        </div>
        <div class="form-group">
            <label for="ToDir">ToDir</label>
            <input type="text" class="form-control" id="ToDir" placeholder="ToDir">
        </div>

        <div class="form-group form-check">
            <input type="checkbox" class="form-check-input" id="IsFilter">
            <label class="form-check-label" for="IsFilter">IsFilter</label>
        </div>
        <div class="form-group">
            <select class="form-control form-control-sm" id="FilterType">
                <option value="0" selected>MoveInFilters</option>
                <option value="1">MoveNotInFilters</option>
            </select>
        </div>
        <div class="form-group">
            <label for="Filters">Filters</label>
            <textarea id="Filters" style="height:150px; width:100%;"></textarea>
        </div>
        <br />
    </form>

    <script src="../../../../lib/jquery/dist/jquery.min.js"></script>
    <script src="../../../../lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

    <script>

        function getFormData() {
            return JSON.stringify({
                IsFilter: $('#IsFilter').prop('checked')
                , FromDir: $('#FromDir').val()
                , ToDir: $('#ToDir').val()
                , FilterType: $('#FilterType').val()
                , Filters: $('#Filters').val()
            });
        }
        function setFormData(dataStr) {
            var data = JSON.parse(dataStr);
            $('#IsFilter').prop('checked', data.IsFilter)
            $('#FromDir').val(data.FromDir)
            $('#ToDir').val(data.ToDir)
            $('#FilterType').val(data.FilterType)
            $('#Filters').val(data.Filters)
        }

    </script>
</body>
</html>